﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lion.WeiXin.Core.Data
{
   public interface INews
    {
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int AID);
        /// <summary>
        /// 增加一条数据
        /// </summary>
        int Add(Models.NewsModel model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(Models.NewsModel model);
        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int AID);
        bool DeleteList(string AIDlist);
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        Models.NewsModel GetModel(int AID);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        List<Models.NewsModel> GetList(string strWhere);
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        List<Models.NewsModel> GetList(int Top, string strWhere, string filedOrder);
        int GetRecordCount(string strWhere);
        List<Models.NewsModel> GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);
        /// <summary>
        /// 根据分页获得数据列表
        /// </summary>
        List<Models.NewsModel> GetList(int PageSize, int PageIndex, string strWhere);
    }
}
